<template>
  <div class="tu">
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item of list" :key="item.id">
        <img :src="item.http" />
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
// var imgs = [
//   { id: '01', http: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/201911/6da1597f11456f5a42a1818ab3f6fa08.jpg_750x200_31b64c4a.jpg' },
//   { id: '02', http: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/201911/774fc492deb29b9bf112ebd1f8d277f5.jpg_750x200_d85df43a.jpg' },
//   { id: '03', http: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/201910/e7eac5a5e99e6517c61b953c0fece63b.jpg_750x200_4b701cf8.jpg' },
//   { id: '04', http: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/201911/1d8faa9f4d49b77ca1e61e2b478260f7.jpg_750x200_25cf76e2.jpg' },
//   { id: '05', http: 'http://img1.qunarzz.com/piao/fusion/1809/3e/52e1824f1ace7202.jpg_750x200_ac90db3f.jpg' },
//   { id: '06', http: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/201911/2b49658e97197ebb14e591fdfebc1c2d.png_750x200_be896fb6.png' }
// ]

export default {
  name: 'RollGo',
  props: {
    list: Array
  },
  data () {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination'
        },
        autoplay: {
          delay: 2000,
          disableOnInteraction: false
        },
        loop: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped="scoped">
  .tu
    width 100%
    height 0
    padding-bottom 26.67%
  img
    width 100%
  .tu>>> .swiper-pagination-bullet-active
    background white
</style>
